﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TimbreRecognition.Recognition.Model
{
    public class NeuronLayer
    {
        private List<Neuron> neurons;

        public void recalculateOutput(double[] input) {
            foreach (Neuron neuron in neurons) {
                neuron.recalculateOutput(input);
            }
        }

        public double[] getOutput()
        {
            double[] output = new double[neurons.Count];
            for (int i = 0; i < neurons.Count; i++)
            {
                Neuron neuron = neurons[i];
                output[i] = neuron.getOutput();
            }
            return output;
        }

        public List<Neuron> getNeurons()
        {
            return neurons;
        }

        public void setNeurons(List<Neuron> neurons)
        {
            this.neurons = neurons;
        }

        public int getNeuronCount()
        {
            return neurons.Count;
        }
    }
}
